#ifndef SERVO_H
#define SERVO_H

#include "main.h"

// Auto reload when 20000
#define CCP180_0 500
#define CCP180_45 1000
#define CCP180_90 1500
#define CCP180_135 2000
#define CCP180_180 2500

#define CCP270_0 500
#define CCP270_135 1500
#define CCP270_270 2500

#define CCP180Step 11u
#define CCP270Step 7.4

//2号舵机3000ticks 可以完成180旋转
void SetServoPWMDutyCycle(TIM_HandleTypeDef* htim, uint32_t channel, uint32_t targetPos);

#endif
